<? echo $this->render("header.phtml"); ?>
<label class="title">Status management</label>
<div class="horiz_sep">&nbsp;</div>
<a href="<?= $this->baseUrl ?>/<?= $this->contextPath ?>/add">Add a new status</a><br/><br/>
<table cellpadding="8" cellspacing="0" width="100%" border="0" style="border: 1px solid #81d2f6; border-bottom: 0px">
	<tr style="background-color: #81d2f6;">
		<td width="1%">#</td>
		<td width="69%">Status name</td>
		<td width="30%">Operations</td>
	</tr>
	<? if ($this -> statuses): ?>
	<? $index = 1; foreach ($this -> statuses as $status): ?>
		<tr>
			<td style="border-bottom: 1px solid #81d2f6;"><? echo $index ++; ?></td>
			<td align="left" style="border-bottom: 1px solid #81d2f6;"><? echo $status -> sta_name; ?></td>
			<td align="left" style="border-bottom: 1px solid #81d2f6;">
				<a	href="<? echo $this -> baseUrl ?>/<?= $this->contextPath ?>/edit/id/<? echo $status -> sta_id ?>">Edit</a>
				&nbsp;&nbsp;
				<a	href="javascript: eway.confirm('<? echo $this -> baseUrl ?>/<?= $this->contextPath ?>/delete/id/<? echo $status -> sta_id ?>', 'Are you sure you want to delete this status?');">Delete</a>
			</td>
		</tr>
	<? endforeach; ?>
	<? endif; ?>
</table>
<? if (((int)$this -> pages) > 1): ?>
	<table cellpadding="8" cellspacing="0" width="100%" border="0">
		<tr>
			<td colspan="6" align="center">
				Page:
				<? for ($i = 0; $i < $this -> pages; $i ++): ?>
					<a href="<? echo $this -> baseUrl; ?>/<?= $this->contextPath ?>/index/page/<? echo ($i + 1); ?>"><? echo $i + 1; ?></a>
					&nbsp;&nbsp;
				<? endfor; ?>
			</td>
		</tr>
	</table>
<? endif; ?>
<? echo $this->render("footer.phtml"); ?>